import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    mode: 'history',
    routes: [
        {
            //默认跳转到的路由
            path: '/',
            redirect: '/firstView'
        },
        {
            path: '/home',
            component: () => import('../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/firstView',
                    component: () => import('../views/first/firstView.vue'),
                    meta: { title: '供应链预警' }
                },
                {
                    path: '/firstDetail',
                    component: () => import('../views/first/firstDetail.vue'),
                    meta: { title: '供应链预警详情' }
                },
                {
                    path: '/aiJianceView',
                    component: () => import('../views/jiance/aiJianceView.vue'),
                    meta: { title: 'AI应用风险信息融合检测' }
                },
                {
                    path: '/quexianList',
                    component: () => import('../views/quexian/quexianList.vue'),
                    meta: { title: '算法缺陷预警' }
                },
                {
                    path: '/quexianView',
                    component: () => import('../views/quexian/quexianView.vue'),
                    meta: { title: '算法缺陷预警' }
                },
                {
                    path: '/gongjiView',
                    component: () => import('../views/gongji/gongjiView.vue'),
                    meta: { title: '新型攻击风险预警' }
                },
                {
                    path: '/gongjiDetail',
                    component: () => import('../views/gongji/gongjiDetail.vue'),
                    meta: { title: '新型攻击风险预警' }
                },
                {
                    path: '/tuanhuoView',
                    component: () => import('../views/tuanhuo/tuanhuoView.vue'),
                    meta: { title: '团伙预警' }
                },
                {
                    path: '/zhishiView',
                    component: () => import('../views/zhishi/zhishiView.vue'),
                    meta: { title: '知识图谱展示' }
                },
                {
                    path: '/taskList',
                    component: () => import('../views/task/taskList.vue'),
                    meta: { title: '任务统计看板' }
                },
                {
                    path: '/abTestAdd',
                    component: () => import('../views/abtest/abTestAdd.vue'),
                    meta: { title: '新增实验' }
                },
                {
                    path: '/abTestView',
                    component: () => import('../views/abtest/abTestView.vue'),
                    meta: { title: '实验管理' }
                },
                {
                    path: '/abTestDetail',
                    component: () => import('../views/abtest/abTestDetail.vue'),
                    meta: { title: '实验详情' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/logout',
            component: () => import(/* webpackChunkName: "logout" */ '../components/page/Logout.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});